class CreateEditionCredits < ActiveRecord::Migration
  def self.up
    create_table :edition_credits do |t|
      t.integer :artist_id
      t.integer :edition_id
      t.string :role
      t.string :details
    end

    add_foreign_key(:edition_credits, :artists, :column => :artist_id)
    add_foreign_key(:edition_credits, :editions, :column => :edition_id)
  end

  def self.down
    drop_table :edition_credits
  end
end
